package com.yoso.shop.application.service;

import com.yoso.base.service.IBaseService;
import com.yoso.shop.domain.stock.StockEntityExample;
import com.yoso.shop.interfaces.vo.stock.StockVo;

import java.util.List;

/**
 * @author shizejin
 * @date 2022/1/30
 * @description:
 */
public interface IStockService extends IBaseService<StockVo, StockEntityExample> {
    /**
     * 减少库存
     *
     * @param stockVo 需要减少的库存信息
     * @param source  库存来源
     * @param remark  备注
     */
    void reduceStock(StockVo stockVo, String source, String remark);

    StockVo findByUniqueKey(StockVo stockVo);

    void addStock(StockVo stockVo, String source, String remark);

    /**
     * 获得未维护库存的商品
     */
    List<StockVo> getUnSafeguardStock();
}
